home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / graphics / pbspline.zip / bspline.txt < prev    next >
Text File  |  1994-05-10  |  2KB  |  71 lines

  1. pov-bspline 1.0
  2. ===============
  3.  
  4. What's it do?: This program takes x,y,z triplets for input, and
  5.   outputs a .pov or .inc file with a b-spline made of cones and
  6.   spheres.  
  7.  
  8. How to compile this thing: cc -o bspline bspline.c -lm
  9.  
  10. Then, type "bspline -h" to see a summary of the options.
  11.  
  12. syntax: bspline [options] < infile > whatever.pov
  13. version: 0.2
  14. options: -h   - This help.
  15.          -i   - make a pov include file, not a pov scene file.
  16.          -t n - Make spline n thickness. (default 1.0)
  17.          -n n - Use n points per control point. (default 5)
  18.          -p n - Degree of polynomial (2-6, default 4)
  19.  
  20. infile should contain only a list of x,y,z points to influence the b-spline.
  21.  
  22. An example infile would look like:
  23.  
  24. 0 0 0
  25. 1 0 0
  26. 1.5 1 0
  27. 1 2 0
  28.  
  29.  
  30. (etc, etc..)  Just the coordinates of the "control points".  
  31.  
  32. The b-spline starts and ends at the first and last control point, but
  33. does not necessarily go through all of the other points.  The other
  34. points influence the direction of the spline.  A spline that actually
  35. goes through all the points is a cubic spline.  This program does not
  36. (yet) support cubic splines.  
  37.  
  38. Note that this is version 1.0.  Brand new.  I wrote this in one
  39. afternoon.  There may be problems lurking inside of it.  If you find
  40. one, or you add some feature (be it neat-o or merely pedestrian), mail
  41. me (meek@alpha2.csd.uwm.edu).  I'd be very grateful. 
  42.   
  43. The options:
  44.  
  45. -h  Help.  
  46.  
  47. -i    Make an include file.  This omits the standard boilerplate camera
  48.       and light source.  Just output it to a .inc file, and #include it
  49.       in your favorite scene.
  50.  
  51. -t n  Make the spline n units thick, where n is a floating point
  52.       number.  Imagine the spline as a snake.  This is how fat the
  53.       snake is.
  54.  
  55. -n n  This puts n points per control point in the spline.  Higher
  56.       values of n lead to smoother curves.  Too high makes your
  57.       rendering mighty slow.   The default is 5.
  58.  
  59. -p n  Use degree n of polynomial.  Degree 2 is the moral equivalent
  60.       of connect-the-dots; you'd have your points connected by
  61.       straight lines, not splines.  If you do that, also do "-n 1".
  62.       Each higher degree is less influenced by the points, and would
  63.       be "straighter".  Like everything in raytracing, it's best
  64.       to keep experimenting with the values, until you get something
  65.       that looks 'right'.
  66.  
  67. I hope this program is of some utility to you..
  68.  
  69. -Michael
  70.  
  71.